<%@page import="java.util.ArrayList"%>
<%@page import="schedule.Sv"%>
<%@page import="schedule.ScheduleMyba"%>
<%@page import="salary.SalaryVo"%>
<%@page import="salary.SalaryMyba"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>



<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
	function schedule(CT_NO) {
		window.open("../homepage/product/schedule.jsp?CT_NO=" + CT_NO,
				"_blank", "resizable=yes, top=300, right=200, width:700px;",
				true);
	}
</script>
<style>
#a {
	z-index: 10;
	width: 1200px;
	margin-left: 100px;
	position: relative;
}

#b {
	margin: auto;
	width: 200px;
	border: 1px solid #cccccc;
	height: 600px;
	float: left;
}

#previewId {
	margin: auto;
	width: 180px;
	border: 1px solid #cccccc;
	height: 190px;
	float: left;
}

#c {
	width: 793px;
	border: 1px solid #cccccc;
	margin: auto;
	float: left;
	height: 600px;
}

#subject {
	width: 100px;
	border: 1px solid #eaeaea;
	float: left;
	text-align: center;
	height: 30px;
	line-height: 30px;
	border-left: 1px solid;
	border-right: 1px solid;
}

.subject1 {
	text-indent: 3px;
	width: 200px;
	height: 20px;
	line-height: 20px;
	margin-top: 3px;
	margin-left: 10px;
}

#subject2 {
	width: 390px;
	border: 1px solid #eaeaea;
	float: left;
	text-align: center;
	height: 30px;
	line-height: 30px;
	border-left: 1px solid;
	border-right: 1px solid;
}

#subject3 {
	width: 198px;
	border: 1px solid #eaeaea;
	float: left;
	text-align: center;
	height: 30px;
	line-height: 30px;
	border-right: 1px solid;
}
</style>
</head>
<body>
	<jsp:useBean id="vo" class="salary.SalaryVo" />
	<jsp:setProperty property="*" name="vo" />
	<%
		SalaryMyba salary = new SalaryMyba();
			salary.setSalaryvo(vo);
			SalaryVo s = salary.view();
			String mid=(String) session.getAttribute("Mid");
			ScheduleMyba sc= new ScheduleMyba();
			Sv sv=new Sv();
			
			sc.setSA_NO(mid);
			ArrayList<Sv> al=sc.list();
	%>

	<div id="a">
		<!-- 가장큰 틀 -->

		<div id="b">
			<!-- 왼쪽 화면단 개인정보와  대출정보 머릿글 표시-->
			<div style="height: 450px; text-align: center; margin-top: 10px;">
				개인정보
				<div id="previewId" style="margin-left: 10px; margin-top: 10px;">
					<img src="../homepage/salary/photo/<%=s.getSA_pho()%>"
						style="width: 180px; height: 190px;">
				</div>
			</div>


			<div style="text-align: center; margin-top: 10px;">대출정보</div>
		</div>

		<!-- 오른쪽 화면단 개인정보와 대출정보 내용 표시 -->
		<div id="c" style="margin-left: 5px">
			<div
				style='border-top: 1px solid; float: left; border-right: 1px solid'>
				<div id="subject">사원번호</div>
				<div style="width: 690px; float: left;">
					<input type='text' readonly class="subject1"
						value='<%=s.getSA_no()%>' name='no'>
				</div>
			</div>
			<div
				style='border-top: 1px solid; float: left; border-right: 1px solid'>
				<div id="subject">사원명</div>
				<div style="width: 690px; float: left;">
					<input type='text' readonly class="subject1"
						value='<%=s.getSA_nm()%>' name='nm'>
				</div>

			</div>

			<div
				style='border-top: 1px solid; float: left; border-right: 1px solid'>
				<div id="subject">성별</div>
				<div style="width: 240px; float: left;">
					<input type='text' readonly class="subject1"
						value='<%=s.getSA_sx()%>' name='sx'>
				</div>
				<div id="subject" style="margin-left: 50px;">나이</div>
				<div style="width: 298px; float: left;">
					<input type='text' readonly class="subject1"
						value='<%=s.getSA_age()%>세' name='age'>
				</div>
			</div>
			<div
				style='border-top: 1px solid; float: left; border-right: 1px solid'>
				<div id="subject">연락처</div>
				<div style="width: 240px; float: left;">
					<input type='text' readonly class="subject1"
						value='<%=s.getSA_ph()%>' name='ph'>
				</div>
				<div id="subject" style="margin-left: 50px;">이메일</div>
				<div style="width: 298px; float: left;">
					<input type='text' readonly class="subject1"
						value='<%=s.getSA_email()%>' name='email'>
				</div>
			</div>
			<div
				style='border-top: 1px solid; float: left; border-right: 1px solid'>
				<div id="subject">주소</div>
				<div style="width: 690px; float: left;">
					<input type='text' readonly class="subject1" style="width: 378px;"
						value='<%=s.getSA_address()%>' name='address'>
				</div>
			</div>
			<div
				style='border-top: 1px solid; float: left; border-right: 1px solid'>
				
				<div id="subject">부서</div>
				<div style="width: 240px; float: left;">
					<input type='text' readonly class="subject1"
						value=
						<%
					String dpm="";
					if(s.getSA_dpm().equals("01"))
						dpm="인사팀";
					else if(s.getSA_dpm().equals("02"))
						dpm="개발팀";
					else if(s.getSA_dpm().equals("03"))
						dpm="총무팀";
					else
						dpm="홍부팀";
				%>		
						<%=dpm %> name='dpm'>
				</div>

				<div id="subject" style="margin-left: 50px;">직급</div>
				<div style="width: 298px; float: left;">
					<input type='text' readonly class="subject1"
						value=
						<%
					String gd="";
					if(s.getSA_gd().equals("01"))
						gd="신입";
					else if(s.getSA_gd().equals("02"))
						gd="대리";
					else if(s.getSA_gd().equals("03"))
						gd="과장";
					else if(s.getSA_gd().equals("04"))
						gd="부장";
					else if(s.getSA_gd().equals("05"))
						gd="팀장";
					else
						gd="이사";
				%>
						<%=gd %> name='gd'>
				</div>
			</div>
			<div
				style='border-top: 1px solid; float: left; border-right: 1px solid'>
				<div id="subject">입사일</div>
				<div style="width: 240px; float: left;">
					<input type='text' readonly class="subject1"
						value='<%=s.getSA_hd()%>' name='hd'>
				</div>

				<div id="subject" style="margin-left: 50px;">연봉</div>
				<div style="width: 298px; float: left;">
					<input type='text' readonly class="subject1"
						value='<%=s.getSA_sal()%>만원' name='sal'>
				</div>
			</div>

			<!-- 빈공간으로 만듬 한줄 띄운 효과발동!! -->
			<div
				style='border-top: 1px solid; float: left; border-right: 1px solid white; height: 10px;'>
				<div id="subject"
					style="border-left: 0px solid white; border-right: 0px solid #ffffff; border-bottom: 0px solid white;"></div>
				<div style="width: 690px; float: left;"></div>
			</div>
			<div
				style='border-top: 1px solid; float: left; border-right: 1px solid'>
				<div id="subject">결혼</div>
				<div style="width: 690px; float: left;">

					<input type='text' readonly class="subject1"
						value='<%=s.getSA_marr()%>' name='marr'>
				</div>
			</div>
			<div
				style='border-top: 1px solid; float: left; border-right: 1px solid'>
				<div id="subject">주택소유여부</div>
				<div style="width: 690px; float: left;">

					<input type='text' readonly class="subject1"
						value='<%=s.getSA_home()%>' name='home'>
				</div>
			</div>
			<div
				style='border-top: 1px solid; float: left; border-right: 1px solid'>
				<div id="subject">차량소유여부</div>
				<div style="width: 690px; float: left;">

					<input type='text' readonly class="subject1"
						value='<%=s.getSA_car()%>' name='car'>
				</div>
			</div>
			<div
				style='border-top: 1px solid; float: left; border-right: 1px solid'>
				<div id="subject">은행명</div>
				<div style="width: 240px; float: left;">
					<input type='text' readonly class="subject1"
						value='<%=s.getSA_bknm()%>' name='bknm'>
				</div>

				<div id="subject" style="margin-left: 50px;">예금주명</div>
				<div style="width: 298px; float: left;">
					<input type='text' readonly class="subject1"
						value='<%=s.getSA_pynm()%>' name='pynm'>
				</div>
			</div>
			<div
				style='border-top: 1px solid; float: left; border-right: 1px solid'>
				<div id="subject">계좌번호</div>
				<div style="width: 690px; float: left;">
					<input type='text' readonly class="subject1"
						value='<%=s.getSA_acc()%>' name='acc'>
				</div>
			</div>

			<!-- 빈공간으로 만듬 한줄 띄운 효과발동!! -->
			<div
				style='border-top: 1px solid; float: left; border-right: 1px solid white; height: 50px;'>
				<div id="subject"
					style="border-left: 0px solid white; border-right: 0px solid #ffffff; border-bottom: 0px solid white;"></div>
				<div style="width: 690px; float: left;"></div>
			</div>
			


		<%
				for(int i=0; i<al.size(); i++){
								sv=al.get(i);
				if(i==0){
			%>
			<div
				style='border-top: 1px solid; float: left; border-right: 1px solid'>
				<div id="subject2">상품</div>
				<div id="subject3">대출기간</div>
				<div id="subject3">대출금리</div>
				<div style="width: 690px; float: left;"></div>

			</div>
			<%
				}
			%>

			<div
				style='border-top: 1px solid; float: left; border-right: 1px solid; border-bottom: 1px solid;'
				onclick="schedule('<%=sv.getCT_NO()%>')">
				<div id="subject2"><%=sv.getPD_NM()%></div>
				<div id="subject3"><%=sv.getPD_PRD()%></div>
				<div id="subject3"><%=sv.getPD_RATE()%></div>
				<div style="width: 690px; float: left;"></div>

			</div>


			<%
				}
			%>



		</div>
	</div>
</body>
</html>